package com.treasure.mall.biz.service.core.order;

import com.treasure.mall.biz.base.SearchableCrudService;
import com.treasure.mall.biz.entity.order.AfterSaleBillPO;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author allan
 * @version 1.0.0
 * @date 2020/6/11
 */
public interface AfterSaleService extends SearchableCrudService<AfterSaleBillPO, String> {
    /**
     * 同意售后
     *
     * @param id
     */
    @Transactional
    void approve(String id);

    /**
     * 取消售后
     *
     * @param id
     */
    @Transactional
    void cancel(String id);

    /**
     * 退款
     *
     * @param id
     */
    @Transactional
    void refund(String id, int refundType);

    void complete(String refundId, String thirdNo, boolean isSuccess, String resultDesc, String creditInfo);

    /**
     * 退款成功
     *
     * @param afterSaleId
     */
    @Transactional
    void complete(String afterSaleId);

    @Transactional
    void complete(AfterSaleBillPO afterSaleBillPO);

    @Transactional
    void refuse(String id, String remark);
}
